package org.example.strategy;

import org.example.model.FarmMachine;

public class WetlandPathStrategy implements PathPlanningStrategy {
    @Override
    public void planPath(FarmMachine machine) {
        System.out.println("执行湿地路径规划策略: " + machine.getType() + "[" + machine.getId() + "]");
        double newX = machine.getPositionX() + Math.random() * 5;
        double newY = machine.getPositionY() + Math.random() * 5;
        machine.setPositionX(newX);
        machine.setPositionY(newY);
        System.out.println("湿地路径新位置: (" + newX + ", " + newY + ")");
    }

    @Override
    public String getStrategyName() {
        return "湿地路径规划";
    }
}
